package com.demo2do.jit.remote;

import com.alibaba.fastjson.JSONObject;

/**
 * Created by wilson on 16/6/10.
 */
public class Result {

    private boolean success;

    private String msg;

    private JSONObject obj;

    /**
     * Determine whether the status is valid
     *
     * @return
     */
    public boolean isValid() {
        return this.success;
    }

    /**
     * Get data according to key
     *
     * @param key
     * @return
     */
    public Object get(String key) {
        return this.obj.get(key);
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public JSONObject getObj() {
        return obj;
    }

    public void setObj(JSONObject obj) {
        this.obj = obj;
    }
}
